﻿<include file="Public:head"/>
	<script src="{iMicms::STATICS}/jquery-ui.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.theme.css" />
	<link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.structure.css" />
<style>
	.linkp{
list-style-type:none;
margin-right:130px;
text-align:right;
color:red;
letter-spacing:5px;
}
.linkp a{
color:#000;
}
.linkp li a{
letter-spacing:2px;
}
.linkp .total{
float:right;
}
</style>
<div class="content">
         
          <div class="cLineB">
             <h4 class="left">编号:{iMicms:$zid}的投票记录<span class="FAQ"></span></h4>
              <div class="clr"></div>
			  <a href="{iMicms::U('User/Vote/eitem',array('id'=>$vid))}" class="right btn btn-primary btn_submit  J_ajax_submit_btn" style="margin-top:-27px">返回</a>
			  <a href="{iMicms::U('User/Vote/outtpjl',array('zid'=>$zid,'vid'=>$vid))}" class="right btn btn-primary btn_submit  J_ajax_submit_btn" style="margin-top:-27px;margin-right:20px;">导出记录</a>
			  
          </div>
          <div class="msgWrap">
          <form method="post" action="index.php?ac=vote-manage&amp;id=9878" id="info">
            <table class="ListProduct" border="0" cellspacing="0" cellpadding="0" width="100%">
              <thead>
                <tr>
					<th>序号</th>
					
					<th>投票人openid</th>
					<th>投票ip</th>
					<th>投票城市</th>
					<th class="time">投票时间</th>
					
                </tr>
              </thead>
              <tbody>
                <tr></tr>
                  <volist id="list" name="liinfo">
                <tr>
                  <td> {iMicms:$list.id}</td>
                 
				   <td>{iMicms:$list.wecha_id}</td>
                  <td>{iMicms:$list.ip}</td>
				  <td>{iMicms:$list.area}</td>
                  <td>{iMicms:$list.touch_time|date='Y-m-d H:i:s',###}</td>
                  
                </tr>
                  </volist>
              </tbody>
            </table>
           </form> 
		   <div id="checkit" style="display:none;width:100%;">
			 <input type="text" id="msgtext" size="30" class="msgtext" style="width:80%;" >
		   </div>
		   	<div id="checkall" style="display:none;width:100%;">
			 <input type="text" id="msgall" size="30" class="msgall" style="width:80%;" >
		   </div>
		<div style="clear:both"></div>
		<div class="linkp">{iMicms:$page}</div>
	<script type="text/javascript">
	$(document).ready(function(){
       $("a[name='onlock']").click(function(){
	    var id= $(this).attr('att');
		var s = $(this).attr('arr');
		var vid = $(this).attr('vid');
		var msg ;
		if(1 == s){
		  msg ="确定要锁定该用户么？ 锁定后无法再投票";
		}
		if(2 == s){
		  msg ="确定要解锁该用户么？";
		}
		var statu = confirm(msg);
        if(!statu){
            return false;
        }
		else{	
				onlock(id,s,vid);
		}
	   });
	 $("a[name='lockmsg']").click(function(){
		 var id= $(this).attr('att');
		var content = $(this).attr('con');
		$('#msgtext').val(content);
		$("#checkit").dialog(
		{
		modal: true,
		title:"投票回复信息",
		buttons: {
			"确定": function() {
			var msg = $("#msgtext").val();
			var submitData={
				msg : msg,
				id  : id,
			};		
			$.post('index.php?g=User&m=Vote&a=lock_msg', submitData, function(bakcdata) 
			{
					var obj=eval('('+bakcdata+')');
						if(obj.success == 1)
							{
								alert(obj.msg);
								parent.location="javascript:location.reload()";
								return 0;
							}
						else
							{
								alert(obj.msg);
								return false;
							}  
				});
				$(this).dialog('close');
			},
			"取消": function() {
				$(this).dialog('close');
			}
		}
		});
	 
	 });
});
	function onlock(id,s,vid){
		var submitData={
            vid : vid,
            id  : id,
			s   : s
        };		
		  $.post('index.php?g=User&m=Vote&a=lock_vote', submitData, function(bakcdata) 
		  {
				var obj=eval('('+bakcdata+')');
					if(obj.success == 1)
						{
							alert(obj.msg);
							parent.location="javascript:location.reload()";
							return 0;
						}
					else
						{
							alert('操作失败，请稍后再试');
							return false;
						}  
		  	 });
	}
	function lockall(d){
	 if(!confirm("确定要全部锁定么？"))
		{
			return false;
		}
		$("#checkall").dialog(
		{
		modal: true,
		title:"请设置锁定后投票回复信息",
		buttons: {
			"确定": function() {
			var msg = $("#msgall").val();
			var submitData={
				msg : msg,
				id  : d,
			};		
			$.post('index.php?g=User&m=Vote&a=lockall', submitData, function(bakcdata) 
			{
					var obj=eval('('+bakcdata+')');
						if(obj.success == 1)
							{
								alert(obj.msg);
								parent.location="javascript:location.reload()";
								return 0;
							}
						else
							{
								alert(obj.msg);
								return false;
							}  
				});
				$(this).dialog('close');
			},
			"取消": function() {
				$(this).dialog('close');
			}
		}
		});
	
	}

 </script>
   </div> 
          <div class="cLine">
            <div class="pageNavigator right">
                 <div class="pages"></div>
              </div>
            <div class="clr"></div>
          </div>
  </div>
<include file="Public:footer"/>